﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:TestClient">

	<Style TargetType="local:DraggedFileView">
		<Setter Property="IsTabStop" Value="true" />
		<Setter Property="TabNavigation" Value="Cycle" />
		<Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:DraggedFileView">
					<Grid x:Name="LayoutRoot" Margin="0" >
						<Grid.ColumnDefinitions>
							<ColumnDefinition Width="100"/>
							<ColumnDefinition Width="30"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="100" />
							<RowDefinition Height="20" />
						</Grid.RowDefinitions>
						<Image x:Name="FileImageImage" Source="{TemplateBinding Thumbnail}" Stretch="Uniform" Margin="2,4,2,4" VerticalAlignment="Center" HorizontalAlignment="Center">
							<Image.Effect>
								<DropShadowEffect Color="DarkGray" />
							</Image.Effect>
						</Image>
						<StackPanel Grid.Column="1" Margin="2" HorizontalAlignment="Center">
							<Button x:Name="btnTag" IsTabStop="False" Style="{StaticResource ImageButtonStyle}" Margin="0,4,0,0" ToolTipService.ToolTip="Tag this file..." ToolTipService.Placement="Top">
								<Image Width="16" Height="16" Source="assets/tag_blue.png"/>
							</Button>
							<Button x:Name="btnComment" IsTabStop="False" Style="{StaticResource ImageButtonStyle}" Margin="0,4,0,0" ToolTipService.ToolTip="Comment on this file..." ToolTipService.Placement="Top">
								<Image Width="16" Height="16" Source="assets/comment.png"/>
							</Button>
							<Button x:Name="btnRemove" IsTabStop="False" Style="{StaticResource ImageButtonStyle}" Margin="0,4,0,0" ToolTipService.ToolTip="Remove this file..." ToolTipService.Placement="Top">
								<Image Width="16" Height="16" Source="assets/image_delete.png"/>
							</Button>
						</StackPanel>
						<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="2" >
							<TextBlock Text="{TemplateBinding FileName}" TextWrapping="Wrap" />
						</StackPanel>
					</Grid>
				</ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
	
</ResourceDictionary>
